
load('summary_data/figA2.rda')

with(samp, cor(home_val, total, 'complete.obs', 'pearson'))
# 0.661202

samp = samp[!is.na(total) & total < 1e6 & home_val < 1e6]

pl = ggplot(data = samp, aes(home_val, total)) +
  geom_abline(aes(intercept = 0, slope = 1), linetype = 'dashed') +
  geom_point(alpha = 0.005) +
  labs(
    x = 'Estimated Home Value, Primary Residence (L2 Commercial)',
    y = 'CoreLogic/L2 Interstate Match (2020)'
  ) +
  theme_light() +
  geom_smooth(method = 'gam', se = F)

pl = ggMarginal(pl)

ggsave(filename = 'figures/compare_measures.png', plot = pl, width = 8, height = 4.5, device = 'png')
